package com.utils;

import org.apache.commons.beanutils.BeanUtils;

import java.lang.reflect.InvocationTargetException;
import java.util.Map;

public class webUtils {
    public static void copyParameTobean(Object obj , Map map){
        try {
            BeanUtils.populate(obj,map);
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }
    }
    public static int parseInt(String str , int i){
        try {
            return Integer.parseInt(str);
        }catch (Exception e){

        }
        return i;
    }

}
